﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Runtime.InteropServices;

namespace TwainDotNet.TwainNative
{
    /// <summary>
    /// /* TWON_ENUMERATION. Container for a collection of values. */
    /// typedef struct {
    ///    TW_UINT16  ItemType;
    ///    TW_UINT32  NumItems;     /* How many items in ItemList                 */
    ///    TW_UINT32  CurrentIndex; /* Current value is in ItemList[CurrentIndex] */
    ///    TW_UINT32  DefaultIndex; /* Powerup value is in ItemList[DefaultIndex] */
    ///    TW_UINT8   ItemList[1];  /* Array of ItemType values starts here       */
    /// } TW_ENUMERATION, FAR * pTW_ENUMERATION;
    /// </summary>
    public class CapabilityEnumValue
    {
        public TwainType TwainType { get; set; }
        public uint ItemCount { get; set; }

        public uint CurrentIndex { get; set; }
        public uint DefaultIndex { get; set; }
        public ArrayList Values = new ArrayList();
        public static int Size
        {
            get
            {
                return (Marshal.SizeOf(typeof(ushort)) + (Marshal.SizeOf(typeof(uint)) * 3));
            }
        }

#pragma warning disable 169
        /// <summary>
        /// The start of the array values
        /// </summary>
        public byte ValueStart;
#pragma warning restore 169
    }
}

